package java2_28;

import java.util.Scanner;

//1:输入两个数，计算他们加减乘除取余的结果。
public class homeWork_1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入第一个数：");
        double a = scanner.nextDouble();
        System.out.println("请输入第二个数：");
        double b = scanner.nextDouble();

        double add = a+b; //加法
        double subtraction = a-b; //减法
        double mul = a*b; //乘法
        double division = a/b; //除法
        double remainder = a%b; //取余

        System.out.println("a+b结果为："+add);
        System.out.println("a-b结果为："+subtraction);
        System.out.println("a*b结果为："+mul);
        System.out.println("a/b结果为："+division);
        System.out.println("a%b结果为："+remainder);
    }
}
